package com.nio.c5_网络编程.selector.messageSide;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author： pang-yun
 * @date： 2021-09-08 13:13
 * 功能目的 ：用于
 */

public class SideClient {
    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress(9999));
        sc.write(Charset.defaultCharset().encode("Hello,i am Pang Chao JIe\n e\n c\n"));
        sc.write(Charset.defaultCharset().encode("Hello,i am Pang yun\n e\n c\n"));
        System.out.println("finish");
        System.in.read();
    }
}
